home *** CD-ROM | disk | FTP | other *** search
/ Programming a Multiplayer FPS in DirectX / Programming a Multiplayer FPS in DirectX (Companion CD).iso / DirectX / dxsdk_oct2004.exe / dxsdk.exe / Samples / C++ / Direct3D / EffectEdit / EffectDoc.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-09-27  |  2.4 KB  |  88 lines

  1. // EffectDoc.h : interface of the CEffectDoc class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. #if !defined(AFX_EFFECTDOC_H__9320DC20_5E33_4D01_A644_02765D9BE875__INCLUDED_)
  6. #define AFX_EFFECTDOC_H__9320DC20_5E33_4D01_A644_02765D9BE875__INCLUDED_
  7.  
  8. #if _MSC_VER > 1000
  9. #pragma once
  10. #endif // _MSC_VER > 1000
  11.  
  12. class COptionsView;
  13. class CErrorsView;
  14. class CRenderView;
  15. class CTextView;
  16.  
  17. class CEffectDoc : public CDocument
  18. {
  19. protected: // create from serialization only
  20.     CEffectDoc();
  21.     DECLARE_DYNCREATE(CEffectDoc)
  22.  
  23. // Attributes
  24. public:
  25.     CString GetCode() { return m_strCode; }
  26.     void SetCode(CString str);
  27.  
  28.     CRenderView* GetRenderView();
  29.     CTextView* GetTextView();
  30.     COptionsView* GetOptionsView();
  31.     CErrorsView* GetErrorsView();
  32.  
  33. // Operations
  34. public:
  35.  
  36. // Overrides
  37.     // ClassWizard generated virtual function overrides
  38.     //{{AFX_VIRTUAL(CEffectDoc)
  39.     public:
  40.     virtual BOOL OnNewDocument();
  41.     virtual void Serialize(CArchive& ar);
  42.     //}}AFX_VIRTUAL
  43.  
  44. // Implementation
  45. public:
  46.     int GetSelectedLine();
  47.     void SelectLine( int iLine );
  48.     CString GetErrorString();
  49.     void Compile( bool bForceCompile = false );
  50.     BOOL GetShowStats();
  51.     void ShowStats( BOOL bShowStats );
  52.     virtual ~CEffectDoc();
  53.     BOOL UsingExternalEditor() { return m_bUsingExternalEditor; }
  54.     BOOL GetLastModifiedTime( CTime* pTime );
  55.     void ReloadFromFile();
  56. #ifdef _DEBUG
  57.     virtual void AssertValid() const;
  58.     virtual void Dump(CDumpContext& dc) const;
  59. #endif
  60.  
  61. protected:
  62.  
  63. // Generated message map functions
  64. protected:
  65.     BOOL m_bUsingExternalEditor;
  66.     BOOL m_bUsingShaderOptimization;
  67.     BOOL m_bFirstTime;
  68.     int m_iLineSelected;
  69.     bool m_bNeedToCompile;
  70.     CString m_strCode;
  71.     CString m_strErrors;
  72.     CStringList m_techniqueNameList;
  73.     //{{AFX_MSG(CEffectDoc)
  74.     afx_msg void OnEditUseExternalEditor();
  75.     afx_msg void OnUpdateEditUseExternalEditor(CCmdUI* pCmdUI);
  76.     afx_msg void OnEditUseShaderOptimization();
  77.     afx_msg void OnUpdateEditUseShaderOptimization(CCmdUI* pCmdUI);
  78.     //}}AFX_MSG
  79.     DECLARE_MESSAGE_MAP()
  80. };
  81.  
  82. /////////////////////////////////////////////////////////////////////////////
  83.  
  84. //{{AFX_INSERT_LOCATION}}
  85. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  86.  
  87. #endif // !defined(AFX_EFFECTDOC_H__9320DC20_5E33_4D01_A644_02765D9BE875__INCLUDED_)
  88.